<?php
		require("../dbconnect.php");
		require("../function.php");

		$main_cat=$_GET["q"];
		
		$get_place=mysql_query("select * from os_sub_category where main_category='$main_cat'");
		$content= "
			<select name='sub_cat' class=text>
			<option value=''>please select sub category</option>
			";
			while($p=mysql_fetch_array($get_place,MYSQL_ASSOC))
			{
				$content.="<option value='".$p['id']."'>".$p['name_chn']." ".$p['name_eng']."</option>";
			}
		$content.="</select>";

		echo iconv('GBK', 'utf-8', $content);
		
?>